﻿package com.msjt.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.msjt.dao.NewJobDAO;
import com.msjt.entity.NewJob;
import com.msjt.service.INewJobService;

/**
 * name:NewsJobService
 * function:招聘信息模块业务逻辑类
 * author: kw
 * time:2013.8.28
 * updateTime:
 */
public class NewJobService implements INewJobService {
	@Resource
	private NewJobDAO newJobDao;

	public NewJobDAO getNewJobDao() {
		return newJobDao;
	}

	public void setNewJobDao(NewJobDAO newJobDao) {
		this.newJobDao = newJobDao;
	}
	
	//添加招聘信息
	/* (non-Javadoc)
	 * @see com.msjt.service.impl.INewJobService#addNewJob(com.msjt.entity.NewJob)
	 */
	public boolean addNewJob(NewJob newJob){
		return this.newJobDao.addNewJob(newJob);
	}
	//删除招聘信息
	/* (non-Javadoc)
	 * @see com.msjt.service.impl.INewJobService#deleteNewJob(com.msjt.entity.NewJob)
	 */
	public boolean deleteNewJob(NewJob newJob){
		return this.newJobDao.delete(newJob);
	}
	//修改招聘信息
	/* (non-Javadoc)
	 * @see com.msjt.service.impl.INewJobService#updateNewJob(com.msjt.entity.NewJob)
	 */
	public boolean updateNewJob(NewJob newJob){
		return this.newJobDao.updateNewJob(newJob);
	}
	//分页显示招聘信息,前台显示招聘信息的全部
	/* (non-Javadoc)
	 * @see com.msjt.service.impl.INewJobService#getNewJobIndexPage(int, int)
	 */
	public List<NewJob> getNewJobIndexPage(int pageIndex,int pageSize){
		return this.newJobDao.getNewJobByIndex(pageIndex, pageSize);
	}
	//分页显示招聘信息，后台只显示招聘信息的职位,日期，截至日期
	/* (non-Javadoc)
	 * @see com.msjt.service.impl.INewJobService#getNewJobAfterPage(int, int)
	 */
	public List<NewJob> getNewJobAfterPage(int pageIndex,int pageSize){
		return this.newJobDao.getNewJobByAfter(pageIndex, pageSize);
	}
	//根据ID查找招聘信息
	/* (non-Javadoc)
	 * @see com.msjt.service.impl.INewJobService#getNewJobById(com.msjt.entity.NewJob)
	 */
	public NewJob getNewJobById(NewJob newJob){
		return this.newJobDao.getNewJobById(newJob);
	}

	public Integer getJobCount() {
		return this.newJobDao.getJobCount();
	}

	public boolean deleteMore(String idString) {
		// TODO Auto-generated method stub
		return this.newJobDao.deleteMore(idString);
	}
	
}
